Optimal. Leaf size=107 \[ -\frac {15 \tanh ^{-1}(\sin (c+d x))}{2 a^4 d}-\frac {15 \sec (c+d x) \tan (c+d x)}{2 a^4 d}+\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^3}+\frac {10 i \sec ^3(c+d x)}{d \left (a^4+i a^4 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3581, 3853,
3855} \begin {gather*} -\frac {15 \tanh ^{-1}(\sin (c+d x))}{2 a^4 d}+\frac {10 i \sec ^3(c+d x)}{d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac {15 \tan (c+d x) \sec (c+d x)}{2 a^4 d}+\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3581
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^3}-\frac {5 \int \frac {\sec ^5(c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{a^2}\\ &=\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^3}+\frac {10 i \sec ^3(c+d x)}{d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac {15 \int \sec ^3(c+d x) \, dx}{a^4}\\ &=-\frac {15 \sec (c+d x) \tan (c+d x)}{2 a^4 d}+\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^3}+\frac {10 i \sec ^3(c+d x)}{d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac {15 \int \sec (c+d x) \, dx}{2 a^4}\\ &=-\frac {15 \tanh ^{-1}(\sin (c+d x))}{2 a^4 d}-\frac {15 \sec (c+d x) \tan (c+d x)}{2 a^4 d}+\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^3}+\frac {10 i \sec ^3(c+d x)}{d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(988\) vs. \(2(107)=214\).
time = 6.23, size = 988, normalized size = 9.23 \begin {gather*} \frac {15 \cos (4 c) \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) \sec ^4(c+d x) (\cos (d x)+i \sin (d x))^4}{2 d (a+i a \tan (c+d x))^4}-\frac {15 \cos (4 c) \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) \sec ^4(c+d x) (\cos (d x)+i \sin (d x))^4}{2 d (a+i a \tan (c+d x))^4}+\frac {\cos (d x) \sec ^4(c+d x) (8 i \cos (3 c)-8 \sin (3 c)) (\cos (d x)+i \sin (d x))^4}{d (a+i a \tan (c+d x))^4}+\frac {\sec (c) \sec ^4(c+d x) (4 i \cos (4 c)-4 \sin (4 c)) (\cos (d x)+i \sin (d x))^4}{d (a+i a \tan (c+d x))^4}+\frac {15 i \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) \sec ^4(c+d x) \sin (4 c) (\cos (d x)+i \sin (d x))^4}{2 d (a+i a \tan (c+d x))^4}-\frac {15 i \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) \sec ^4(c+d x) \sin (4 c) (\cos (d x)+i \sin (d x))^4}{2 d (a+i a \tan (c+d x))^4}+\frac {\sec ^4(c+d x) (8 \cos (3 c)+8 i \sin (3 c)) (\cos (d x)+i \sin (d x))^4 \sin (d x)}{d (a+i a \tan (c+d x))^4}+\frac {\sec ^4(c+d x) \left (\frac {1}{4} \cos (4 c)+\frac {1}{4} i \sin (4 c)\right ) (\cos (d x)+i \sin (d x))^4}{d \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^2 (a+i a \tan (c+d x))^4}+\frac {\sec ^4(c+d x) \left (-\frac {1}{4} \cos (4 c)-\frac {1}{4} i \sin (4 c)\right ) (\cos (d x)+i \sin (d x))^4}{d \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )^2 (a+i a \tan (c+d x))^4}+\frac {4 \sec ^4(c+d x) (\cos (d x)+i \sin (d x))^4 \left (\frac {1}{2} \cos \left (4 c-\frac {d x}{2}\right )-\frac {1}{2} \cos \left (4 c+\frac {d x}{2}\right )+\frac {1}{2} i \sin \left (4 c-\frac {d x}{2}\right )-\frac {1}{2} i \sin \left (4 c+\frac {d x}{2}\right )\right )}{d \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) (a+i a \tan (c+d x))^4}+\frac {4 \sec ^4(c+d x) (\cos (d x)+i \sin (d x))^4 \left (-\frac {1}{2} \cos \left (4 c-\frac {d x}{2}\right )+\frac {1}{2} \cos \left (4 c+\frac {d x}{2}\right )-\frac {1}{2} i \sin \left (4 c-\frac {d x}{2}\right )+\frac {1}{2} i \sin \left (4 c+\frac {d x}{2}\right )\right )}{d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) (a+i a \tan (c+d x))^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.28, size = 118, normalized size = 1.10
method | result | size |
risch | \(\frac {8 i {\mathrm e}^{-i \left (d x +c \right )}}{a^{4} d}+\frac {i \left (7 \,{\mathrm e}^{3 i \left (d x +c \right )}+9 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \,a^{4} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {15 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 a^{4} d}-\frac {15 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 a^{4} d}\) | \(107\) |
derivativedivides | \(\frac {\frac {2 \left (\frac {1}{4}-2 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {15 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2}+\frac {2 \left (\frac {1}{4}+2 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {15 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2}+\frac {16}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a^{4} d}\) | \(118\) |
default | \(\frac {\frac {2 \left (\frac {1}{4}-2 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {15 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2}+\frac {2 \left (\frac {1}{4}+2 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {1}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {15 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2}+\frac {16}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a^{4} d}\) | \(118\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 457 vs. \(2 (95) = 190\).
time = 0.54, size = 457, normalized size = 4.27 \begin {gather*} \frac {30 \, {\left (\cos \left (5 \, d x + 5 \, c\right ) + 2 \, \cos \left (3 \, d x + 3 \, c\right ) + \cos \left (d x + c\right ) + i \, \sin \left (5 \, d x + 5 \, c\right ) + 2 i \, \sin \left (3 \, d x + 3 \, c\right ) + i \, \sin \left (d x + c\right )\right )} \arctan \left (\cos \left (d x + c\right ), \sin \left (d x + c\right ) + 1\right ) + 30 \, {\left (\cos \left (5 \, d x + 5 \, c\right ) + 2 \, \cos \left (3 \, d x + 3 \, c\right ) + \cos \left (d x + c\right ) + i \, \sin \left (5 \, d x + 5 \, c\right ) + 2 i \, \sin \left (3 \, d x + 3 \, c\right ) + i \, \sin \left (d x + c\right )\right )} \arctan \left (\cos \left (d x + c\right ), -\sin \left (d x + c\right ) + 1\right ) + 15 \, {\left (i \, \cos \left (5 \, d x + 5 \, c\right ) + 2 i \, \cos \left (3 \, d x + 3 \, c\right ) + i \, \cos \left (d x + c\right ) - \sin \left (5 \, d x + 5 \, c\right ) - 2 \, \sin \left (3 \, d x + 3 \, c\right ) - \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) + 1\right ) + 15 \, {\left (-i \, \cos \left (5 \, d x + 5 \, c\right ) - 2 i \, \cos \left (3 \, d x + 3 \, c\right ) - i \, \cos \left (d x + c\right ) + \sin \left (5 \, d x + 5 \, c\right ) + 2 \, \sin \left (3 \, d x + 3 \, c\right ) + \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1\right ) + 60 \, \cos \left (4 \, d x + 4 \, c\right ) + 100 \, \cos \left (2 \, d x + 2 \, c\right ) + 60 i \, \sin \left (4 \, d x + 4 \, c\right ) + 100 i \, \sin \left (2 \, d x + 2 \, c\right ) + 32}{-4 \, {\left (i \, a^{4} \cos \left (5 \, d x + 5 \, c\right ) + 2 i \, a^{4} \cos \left (3 \, d x + 3 \, c\right ) + i \, a^{4} \cos \left (d x + c\right ) - a^{4} \sin \left (5 \, d x + 5 \, c\right ) - 2 \, a^{4} \sin \left (3 \, d x + 3 \, c\right ) - a^{4} \sin \left (d x + c\right )\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 160, normalized size = 1.50 \begin {gather*} -\frac {15 \, {\left (e^{\left (5 i \, d x + 5 i \, c\right )} + 2 \, e^{\left (3 i \, d x + 3 i \, c\right )} + e^{\left (i \, d x + i \, c\right )}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 15 \, {\left (e^{\left (5 i \, d x + 5 i \, c\right )} + 2 \, e^{\left (3 i \, d x + 3 i \, c\right )} + e^{\left (i \, d x + i \, c\right )}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 30 i \, e^{\left (4 i \, d x + 4 i \, c\right )} - 50 i \, e^{\left (2 i \, d x + 2 i \, c\right )} - 16 i}{2 \, {\left (a^{4} d e^{\left (5 i \, d x + 5 i \, c\right )} + 2 \, a^{4} d e^{\left (3 i \, d x + 3 i \, c\right )} + a^{4} d e^{\left (i \, d x + i \, c\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec ^{7}{\left (c + d x \right )}}{\tan ^{4}{\left (c + d x \right )} - 4 i \tan ^{3}{\left (c + d x \right )} - 6 \tan ^{2}{\left (c + d x \right )} + 4 i \tan {\left (c + d x \right )} + 1}\, dx}{a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.78, size = 113, normalized size = 1.06 \begin {gather*} -\frac {\frac {15 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{4}} - \frac {15 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{4}} - \frac {2 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 8 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 8 i\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} a^{4}} - \frac {32}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.52, size = 162, normalized size = 1.51 \begin {gather*} -\frac {15\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^4\,d}+\frac {\frac {9\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{a^4}-\frac {7\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^4}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,39{}\mathrm {i}}{a^4}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,17{}\mathrm {i}}{a^4}+\frac {24{}\mathrm {i}}{a^4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,1{}\mathrm {i}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,2{}\mathrm {i}-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________